package cn.buk.tms.dto;

/**
 * @author yfdai
 */
public class PaymentOrderDto {

	private int id;

	private String tradeNo;

	private int enterpriseId;

	private String enterpriseName;

	private Integer ownerEnterpriseId;

	private int userId;

	private int quantity = 1;

	private double price;

	private int status;

	private String statusDesc;

	/**
	 * 订单类型：
	 * 空或者 00 表示充值
	 * 01 - 表示大客户订单（目前唯一的订单类型）
	 */
	private String orderType;

	/**
	 * 订单类型是大客户订单的话，则保留订单的 id ，方便页面跳转;
	 * 其它情况留空
	 */
	private Integer orderId;

	private String remoteAddr;

	/**
	 * 订单备注
	 */
	private String memo;


	// 以下为微信支付返回的内容

	private String appid;

	private String mchId;

	private String deviceInfo;

	private String openid;


	private String transactionId;

	private String bankType;

	private Integer cashFee;

	private String timeEnd;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}

	public String getRemoteAddr() {
		return remoteAddr;
	}

	public void setRemoteAddr(String remoteAddr) {
		this.remoteAddr = remoteAddr;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	/**
	 * @return the status
	 */
	public int getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(int status) {
		this.status = status;
	}

	/**
	 * @return the memo
	 */
	public String getMemo() {
		return memo == null ? "" : memo.trim();
	}

	/**
	 * @param memo the memo to set
	 */
	public void setMemo(String memo) {
		this.memo = memo;
	}

	/**
	 * @return the price
	 */
	public double getPrice() {
		return price;
	}

	/**
	 * @param price the price to set
	 */
	public void setPrice(double price) {
		this.price = price;
	}

	public String getTradeNo() {
		return tradeNo;
	}

	public void setTradeNo(String tradeNo) {
		this.tradeNo = tradeNo;
	}

	public int getEnterpriseId() {
		return enterpriseId;
	}

	public void setEnterpriseId(int enterpriseId) {
		this.enterpriseId = enterpriseId;
	}

	public void setOwnerEnterpriseId(int ownerEnterpriseId) {
		this.ownerEnterpriseId = ownerEnterpriseId;
	}

	public int getOwnerEnterpriseId() {
		return ownerEnterpriseId;
	}

	public String getAppid() {
		return appid;
	}

	public void setAppid(String appid) {
		this.appid = appid;
	}

	public String getMchId() {
		return mchId;
	}

	public void setMchId(String mchId) {
		this.mchId = mchId;
	}

	public String getDeviceInfo() {
		return deviceInfo;
	}

	public void setDeviceInfo(String deviceInfo) {
		this.deviceInfo = deviceInfo;
	}

	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}

	public String getTransactionId() {
		return transactionId;
	}

	public void setTransactionId(String transactionId) {
		this.transactionId = transactionId;
	}

	public String getBankType() {
		return bankType;
	}

	public void setBankType(String bankType) {
		this.bankType = bankType;
	}

	public Integer getCashFee() {
		return cashFee;
	}

	public void setCashFee(Integer cashFee) {
		this.cashFee = cashFee;
	}

	public String getTimeEnd() {
		return timeEnd;
	}

	public void setTimeEnd(String timeEnd) {
		this.timeEnd = timeEnd;
	}

	public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	public Integer getOrderId() {
		return orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	public String getEnterpriseName() {
		return enterpriseName;
	}

	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}

	public String getStatusDesc() {
		if (statusDesc == null) {
			switch (this.status) {
				case 0:
					return "待付款";
				case 9:
					return "已付款";
				default:
					return this.status + "";
			}

		} else {
			return statusDesc;
		}
	}

	public void setStatusDesc(String statusDesc) {
		this.statusDesc = statusDesc;
	}
}

